﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using DoAn.DTO;
using System.Data;

namespace DoAn.DAO
{
    public class ChiTietThanhToanDAO
    {
        public static void themChiTietTT(ChiTietThanhToanDTO ct)
        {
            string sql="insert into CHITIETTHANHTOAN(MaSan,MaHinhThucTT) values("+ct.MaSan.ToString()
                +","+ct.MaHinhThucTT.ToString()+")";
            DataProvider.ExcuteQuery(sql);
        }
        public static DataTable loadchitiettheoma(int ma)
        {
            string sql = "select * from CHITIETTHANHTOAN ct, HINHTHUCTHANHTOAN ht where ct.MaSan ='"+ma.ToString()+"' and ct.MaHinhThucTT = ht.MaHinhThucTT";
            return DataProvider.DataTable(sql);
        }
    }
}